package org.alps.pattern.decorator.battercake.v2;

/**
 * @date 2021-05-01
 * @author zkw
 */
public class BattercakeTest {

    public static void main(String[] args) {

        //一个饥饿的小伙子，路过一个煎饼摊买煎饼充饥
        Battercake battercake = new BaseBattercake();

        //煎饼优点小，要加一个鸡蛋
        battercake = new EggDecorator(battercake);

        //一个鸡蛋还不够，再加一个鸡蛋
        battercake = new EggDecorator(battercake);

        //感觉还不够，再加一个香肠
        battercake = new SausageDecorator(battercake);

        System.out.println(battercake.getMsg() + "，总价：" + battercake.getPrice() + "元");


    }

}
